import { init } from 'snabbdom/build/package/init'
import { h } from 'snabbdom/build/package/h'
import {styleModule} from 'snabbdom/build/package/modules/style'
import {eventListenersModule} from 'snabbdom/build/package/modules/eventlisteners'
const patch = init([])
const app = document.querySelector('#app')

//  用户生成key 在patchvnode的区别是什么

// 首次渲染
let vnode = h('ul',[
  h('li',{key: 'a'},'首页'),
  h('li',{key: 'b'},'视频'),
  h('li',{key: 'c'},'微博'),
])

let oldvnode = patch(app,vnode)

// updateChildren 的执行过程
vnode = h('ul',[
  h('li',{key: 'a'},'首页'),
  h('li',{key: 'c'},'微博'),
  h('li',{key: 'b'},'视频'),
])

patch(oldvnode,vnode)
